#ifndef GAMEPLAY_PIECE_H
#define GAMEPLAY_PIECE_H


#include "SDL.h"
#include "Engine/Synaptic/Misc.h"
#include "Engine/Visual.h"
#include "Engine/Reason.h"
#include "Engine/Sense.h"
#include "Engine/Resource/Graphic.h"
#include "Engine/Kinetic/Movement.h"
#include "Engine/Kinetic/Animation.h"

namespace Gameplay {

class Piece : public Engine::Visual, public Engine::Reason, public Engine::Sense {
  private:
	Sint32 pieceID; 
	Sint16 column; 
	Sint16 row; 
	Sint16 turns; 
	const Misc::Frame & pieceFrame; 
	const Misc::Frame boardFrame; 
	Engine::Resource::Graphic gfx; 
	Engine::Resource::Graphic shadowGfx; 
	Misc::Frame piecePosition; 
	Engine::Kinetic::Movement movement; 
	Engine::Kinetic::Animation retryAnimation; 

  public:
	Piece(int id, const Misc::Frame & pieceFrame, const Misc::Frame & boardFrame, const Engine::Resource::Graphic & targetGraphic); 
	virtual ~Piece(); 
	void retry(); // Reset the piece.
	void turn(Misc::Direction direction); 
	void move(Misc::Direction direction); 
	virtual void pulse(int delta); 
	inline virtual void exit(); 
	virtual Engine::Resource::GraphicList display(); 
  friend class Board;
};
inline void Piece::exit() {
}


} // namespace Gameplay
#endif
